From c4e44eb895fd006f8d869d7cb734fe8e510b647f Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Fri, 10 Nov 2017 07:25:14 -0700 Subject: [PATCH] enhance test_encoding to check gbfile gzapi. --- test_encoding | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/test_encoding b/test_encoding index 44d9b49c4..5a374510a 100755 --- a/test_encoding +++ b/test_encoding @@ -13,31 +13,41 @@ errorcount=0 if locale -a | grep -q en_US.iso88591 ; then export LC_ALL=en_US.iso88591 - rm -f ${TMPDIR}/file*.kml - rm -f ${TMPDIR}/file*.gpx # test input file name mangling - cp ${REFERENCE}/bounds-test.gpx ${TMPDIR}/file¢.gpx - ${PNAME} -i gpx -f ${TMPDIR}/file¢.gpx -o kml -F ${TMPDIR}/fileo.kml || { + rm -f ${TMPDIR}/test_encoding_file* + cp ${REFERENCE}/bounds-test.gpx ${TMPDIR}/test_encoding_file¢.gpx + ${PNAME} -i gpx -f ${TMPDIR}/test_encoding_file¢.gpx -o kml -F ${TMPDIR}/test_encoding_fileo.kml || { echo "ERROR: The input file name was mangled." errorcount=`expr $errorcount + 1` } # test output file name mangling - ${PNAME} -i gpx -f ${REFERENCE}/bounds-test.gpx -o kml -F ${TMPDIR}/file¢.kml - count=$(ls -1 -l ${TMPDIR}/file¢.kml | wc -l) + rm -f ${TMPDIR}/test_encoding_file* + ${PNAME} -i gpx -f ${REFERENCE}/bounds-test.gpx -o kml -F ${TMPDIR}/test_encoding_file¢.kml + count=$(ls -1 -l ${TMPDIR}/test_encoding_file¢.kml | wc -l) if [ $count -lt 1 ]; then echo "ERROR: The output file name was mangled." errorcount=`expr $errorcount + 1` fi # test output file name mangling using a format that uses gbfile - ${PNAME} -i gpx -f ${REFERENCE}/bounds-test.gpx -o unicsv -F ${TMPDIR}/file¢.csv - count=$(ls -1 -l ${TMPDIR}/file¢.csv | wc -l) + rm -f ${TMPDIR}/test_encoding_file* + ${PNAME} -i gpx -f ${REFERENCE}/bounds-test.gpx -o unicsv -F ${TMPDIR}/test_encoding_file¢.csv + count=$(ls -1 -l ${TMPDIR}/test_encoding_file¢.csv | wc -l) if [ $count -lt 1 ]; then echo "ERROR: The output file name was mangled." errorcount=`expr $errorcount + 1` fi + +# test input file name mangling using a format that uses gbfile with the gzapi + rm -f ${TMPDIR}/test_encoding_file* + cp ${REFERENCE}/sample.gtm.gz ${TMPDIR}/test_encoding_file¢.gtm.gz + ${PNAME} -i gtm -f ${TMPDIR}/test_encoding_file¢.gtm.gz -o gpx -F ${TMPDIR}/test_encoding_fileo.gpx || { + echo "ERROR: The input file name was mangled." + errorcount=`expr $errorcount + 1` + } + else echo "$0 cannot run without the en_US.iso88591 locale." fi -- 2.30.2